<template>
	<view class="header">
			<view class="authorized-header">
				<view class="authorized-head" v-if="isProvince">
					<view :class="isAudit==false?'au-title':''">
						<text @tap.stop="authorized()">授权赛事</text>
					</view>
					<view :class="isAudit==true?'au-title':''">
						<text @tap.stop="audit()">赛事审核</text>
					</view>
				</view>
				<view class="authorized-status">
					<view :class="item.type==type_id?'blue':''" v-for="(item,index) in statusList" @tap.stop="selectStatus(item.type)" :key='index'>
						<text>{{item.checkStatus}}</text>
					</view>
				</view>
			</view>
	</view>
</template>

<script>
	export default{
		props:{
			isAudit:{
				type:Boolean, //是否为审核页面
				default:false,
			},
			isProvince:{
				type:Boolean,
				delault:false
			},
			statusList:Array,
			type_id:String
		},
		data(){
			return{
				// isAudits:false
			}
		},
		onload() {
			var _this=this;
			_this.isAudit=false;
		},
		methods:{
			authorized(){
				var _this=this;
				_this.$emit('toAuthorized')
			},
			audit(){
				var _this=this;
				_this.$emit('toAudit')
			},
			selectStatus(typeID){
				var _this=this;
				_this.$emit("toSelectStatus",typeID);
			}
		}
	}
</script>

<style lang="less" scoped>
	.header{
		background: #fff;
	}
	.authorized-head{
		display: flex;
		flex-direction: row;
		border-bottom: 2rpx solid #F6F7F9;
		view{
			color:#ACACAC;
			width: 50%;
			text-align: center;
			padding:10rpx 0 ;
			margin: 10rpx 0;
			font-size: 32rpx;
			position: relative;
			display: flex;
			justify-content: center;
		}
		.au-title{
			color: #333;
			width: 50%;
			text-align: center;
			padding:10rpx 0 ;
			font-size: 32rpx;
			position: relative;
			display: flex;
			justify-content: center;
		}
		.au-title:after{
				content: "";
				width: 88rpx;
				height: 6rpx;
				background:#2D8DFF;
				position: absolute;
				bottom: 0;
				text-align: center;
			}
	}
	.authorized-status{
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		font-size: 28rpx;
		height: 88rpx;
		align-items: center;
		view{
			width: 25%;
			text-align: center;
			color:#ACACAC;
		}
		.blue{
			color: #2D8DFF;
		}
	}
</style>
